﻿
using Microsoft.Web.WebPages.OAuth;
using System.Web.Configuration;
namespace AfrikDotnetWebSite
{
    public static class AuthConfig
    {
        public static void RegisterAuth()
        {
            // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, and Twitter,
            // you must update this site. For more information visit http://go.microsoft.com/fwlink/?LinkID=252166

            var appSettings = WebConfigurationManager.AppSettings;

            OAuthWebSecurity.RegisterMicrosoftClient(
                clientId: appSettings["OAuth_MS_Key"],
                clientSecret: appSettings["OAuth_MS_Secret"]);

            OAuthWebSecurity.RegisterTwitterClient(
                consumerKey: appSettings["OAuth_TT_Key"],
                consumerSecret: appSettings["OAuth_TT_Secret"]);

            OAuthWebSecurity.RegisterFacebookClient(
                appId: appSettings["OAuth_FB_Key"],
                appSecret: appSettings["OAuth_FB_Secret"]);

            OAuthWebSecurity.RegisterLinkedInClient(
                consumerKey: appSettings["OAuth_LI_Key"],
                consumerSecret: appSettings["OAuth_LI_Secret"]);

            OAuthWebSecurity.RegisterGoogleClient();
            OAuthWebSecurity.RegisterYahooClient();
        }
    }
}
